import request from '@/utils/request'

// 获取完整权限树
export const getRuleList = (data?: any) =>
  request({
    url: '/rule/list',
    method: 'post'
  })
// 查看权限详情
export const ruleView = (data?: any) =>
  request({
    url: '/rule/view',
    method: 'post',
    data
  })
// 创建权限
export const ruleCreate = (data?: any) =>
  request({
    url: '/rule/create',
    method: 'post',
    data
  })
// 修改权限
export const ruleUpdate = (data?: any) =>
  request({
    url: '/rule/update',
    method: 'post',
    data
  })
// 删除权限
export const ruleDelete = (data?: any) =>
  request({
    url: '/rule/delete',
    method: 'post',
    data
  })

// 可选的规则类
export const ruleSelectClass = (data?: any) =>
  request({
    url: '/rule/selectable-classes',
    method: 'post',
    data
  })
